<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <jsp:include page="commons/static.jsp" />
    <title>软赢博客</title>

    <style>

        .articles{
            list-style-type: none;
        }

        .article{
            padding: 15px 0;
            border-bottom: 1px dashed #ddd;
        }

        .article .title{
            font-size: 24px;
            line-height: 30px;
        }

        .article p{
            font-size: 18px;
            color: #999;
            margin: 10px 0;
        }

        .article div{
            font-size: 12px;
            color: #999;
            margin-top: 20px;
        }

        .article div span{
            margin-right: 20px;
        }

        .article:last-child{
            border: none;
        }

    </style>
</head>
<body>
<jsp:include page="commons/header.jsp" />

<div class="container">
    <ul class="articles">
        <c:forEach items="${article}" var="a">
            <li class="article">
                <a class="title" href="/blog/article?id=${a.id}">${a.title}</a>
                <p>${a.summary}</p>
                <div>
                    <label for="">作者：</label>
                    <span>${a.user.nickname}</span>

                    <label for="">发表时间：</label>
                    <span>
                            <fmt:formatDate value="${a.addTime}" pattern="yyyy-MM-dd HH:mm:ss" />
                        </span>
                </div>
            </li>
        </c:forEach>

    </ul>
</div>

</body>
</html>